Localization Routing and SEO Setup#107
Conversation
- Integrates react-router-dom to handle /:lang routing. - Decouples i18n context from IDB logic. IDB is only updated via manual language clicks. - Re-routes root to the user's saved language preference or zh-cn. - Introduces build-time script to generate localized SEO index.html pages with ld-json and alternate metadata. - Configures sitemap generation for localized routes. - Adds empty search engine verification tags. Co-authored-by: OsakaLOOP <68284076+OsakaLOOP@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Extracts latest `changelog.json` version and content.
- Parses `company_data.json` for supported companies list.
- Dynamically iterates all GeoJSON features to construct a Company -> Line -> Station hierarchy.
- Flattens language string sets from `locales/*/translation.json`.
- Injects all combined static content into a hidden `<div id="seo-content">` inside each generated `dist/{lang}/index.html` file before `</body>`.
- Fixes module reference errors for missing react-router hooks in LoginModal and InitialSetupModal components.
Co-authored-by: OsakaLOOP <68284076+OsakaLOOP@users.noreply.github.com>
- Added missing `saveData` callback to `LoginModal.jsx` when explicitly switching languages manually, preventing IDB and backend drift. - Installed missing `react-helmet-async` dependency into `package.json` to fix fatal "Module not found" build and runtime errors caused by dynamically updating the HTML lang attribute in `<AppLayout>`. Co-authored-by: OsakaLOOP <68284076+OsakaLOOP@users.noreply.github.com>
Implements full localization routing decoupling it from local storage directly. Updates the URL and context simultaneously. During build time, automatically generates index.html copies for each language variant with properly populated SEO tags and schemas. Includes sitemap.xml.
PR created automatically by Jules for task 228219827929079271 started by @OsakaLOOP